<%--
  Created by IntelliJ IDEA.
  User: 123
  Date: 2024/6/25
  Time: 21:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page import="qin.com.DataConnection" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%

    //获取表单传送过来的用户名

    String name=request.getParameter("name");

    //获取表单传送过来的密码

    double java = Double.parseDouble(request.getParameter("java"));
    double jsp = Double.parseDouble(request.getParameter("jsp"));
    double oracle = Double.parseDouble(request.getParameter("oracle"));


    //要执行的sql命令

    String sql="insert into chengji(name,java,jsp,oracle) values(?,?,?,?)";

    //命令中参数赋值。

    Object[] para=new Object[]{name,java,jsp,oracle};

    if(DataConnection.request(sql,para)){

        response.sendRedirect("selectusers.jsp");

    }else{

        out.println("<a href=selectusers.jsp>跳转到用户列表</a>");
    }

%>
</body>
</html>
